<?php

namespace app\company\model;

use app\common\model\BaseModel;
use app\common\model\Company;
use think\model\relation\BelongsTo;
use think\model\relation\HasMany;

class CompanyUser extends BaseModel
{
    protected $hidden = ['password', 'delete_time'];

    public function company(): BelongsTo
    {
        return $this->belongsTo(Company::class, 'company_id');
    }

    public function userAuth(): hasMany
    {
        return $this->hasMany(CompanyUserAuth::class, 'company_user_id');
    }

}